59a51e4ae0c6cb7005a29c8d965f615157076c9b,carbon/src/main/java/carbon/widget/CheckBox.java,CheckBox,setRippleDrawable,#RippleDrawable#,187
Before Change
}
public void setRippleDrawable(RippleDrawable newRipple) {
if (rippleDrawable != null) {
rippleDrawable.setCallback(null);
if (rippleDrawable.getStyle() == RippleDrawable.Style.Background)
super.setBackgroundDrawable(rippleDrawable.getBackground());
}
if (newRipple != null) {
newRipple.setCallback(this);
newRipple.setBounds(0, 0, getWidth(), getHeight());
if (newRipple.getStyle() == RippleDrawable.Style.Background)
super.setBackgroundDrawable((Drawable) newRipple);
}
rippleDrawable = newRipple;
After Change
*
* @param d The Drawable to use as the button graphic
*/
public void setButtonDrawable(CheckableDrawable d) {
if (drawable != d) {
if (drawable != null) {
drawable.setCallback(null);
unscheduleDrawable(drawable);
}
drawable = d;
if (d != null) {
d.setCallback(this);
//d.setLayoutDirection(getLayoutDirection());
if (d.isStateful()) {
d.setState(getDrawableState());
}
d.setVisible(getVisibility() == VISIBLE, false);
setMinHeight(d.getIntrinsicHeight());
applyButtonTint();
}
}
}